4. Monitor Mobile Device Usage
When users can freely add
and remove mobile devices that are in their possession, it is difficult
to get a handle on what's in use. Exchange comes with some basic
monitoring functionality that can help you understand who is using the
device and in what ways.
4.1. Retrieve a List of Devices for a User
Users can potentially connect
more than one device to Exchange. If you want to perform activities on a
single device, you need to ensure you are targeting the right one. For
example, if the user has two devices and one of them is lost, you don't
want to accidentally wipe the wrong device. To do this, you can retrieve
the list of devices for a user.
To retrieve the list of devices for a user through the EMC:
Open the EMC and browse to the Recipient Configuration => Mailbox node.
From the list of mailboxes in the Results pane, select the mailbox that you want to retrieve a list of mobile devices for.
In the Actions pane, select the Manage Mobile Phone option.
This will launch the Manage Mobile Device dialog box.
In
the Manage Mobile Device dialog box, a list of devices for the mailbox
is presented. Click on a device to have the dialog box populated with
the device's information.
You can also retrieve a list of mobile devices for a user from the EMS using the Get-ActiveSyncDeviceStatistics command. You will need to specify the Mailbox
parameter and point it to the user's mailbox that you want the devices
for. For example, the following command prints the list of devices for a
user in a table:
Get-ActiveSyncDeviceStatistics -Mailbox "John Smith" |
ft
4.2. Generate Device Reports
To stay on top of your usage
trends, you should regularly examine client access logs. ActiveSync
stores its logs in IIS. However, when it comes time to collect the logs,
it can be difficult to read through them all and weed out the right
information. Therefore, Exchange 2010 offers an ActiveSync command that
goes through the IIS logs and creates reports based on those logs for
you.
Six different reports are generated:
Usage Report (users.csv)
Shows a detailed usage report for each user
Hourly Report (hourly.csv)
Shows the number of unique devices and how many synchronizations were requested for each hour of the day
Policy Compliance Report (policycompliance.csv)
Shows the number of fully compliant, partially compliant, and noncompliant devices
Server Report (servers.csv)
Shows the device connection statistics broken down for each server
HTTP Status Report (statuscodes.csv)
Shows the HTTP status codes encountered by the devices
User Agent (useragents.csv)
Shows the various user agents used by the devices
4.2.1. Generate Reports for a Single Day
The reports can only be generated with the EMS. To run the report, you use the Export-ActiveSyncLog command. When you run the command, you must use the FileName
parameter to specify the location of the IIS logs from which you want
to gather the report data. The following example will create reports
from the IIS log file u_ex090608.log and store them in c:\reports:
Export-ActiveSyncLog -FileName
C:\inetpub\logs\LogFiles\W3SVC1\u_ex090608.log
-OutputPath c:\reports
4.2.2. Change How Often New Log Files Are Created
By default, Exchange uses
daily IIS logs. If you want to retrieve statistics for ActiveSync based
on a larger collection period, you can modify the log settings generated
by ActiveSync. For example, these steps will enable you to generate
monthly logs instead of daily logs:
Open the IIS Manager tool by clicking Start => All Programs => Administrative Tools => Internet Information Services (IIS) Manager.
Browse
to the Default Web Site node in the Console tree. If you are hosting
the ActiveSync virtual directory in another site instead of the default
site, browse to that site instead.
In the Work area, double-click the Logging icon under the IIS section.
In the Log File Rollover box, change the Schedule option to Monthly.
Click Apply in the Actions pane.
After making this change, the logs are recorded in a single file each month. When you run the Export-ActiveSyncLog
command and specify that file, it will generate reports for the entire
month instead of just the one day. Note that previously the log file was
dated with the year, month, and day that the logs were captured (u_ex090609.log). After you change it to a monthly log, the file name changes to just the year and the month (u_ex0906.log).